import UIKit

var range1 = 1 ... 4
var range2 = 1.5 ..< 5

//步长for循环

//1.开区间0...<10步长2
for index in stride(from: 0, to: 10, by: 2) {
  print(index)
}
//2.闭区间0...10步长2
for index in stride(from: 0, through: 10, by: 2) {
  print("through : \(index)")
}
//反向
for index in stride(from: 0, to: 10, by: 2).reversed() {
  print("反向: \(index)")
}
